package com.qf.pojo.respVo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @ClassName BaseResp
 * @Description TODO
 * @Author Nslsg
 * @Date 2022/10/25 20:30
 * @Version 1.0
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseResp {

    private Integer code;

    private String msg;

    private Object data;

    private Long total;

    public BaseResp OK(String msg,Object data ,Long total){
        return new BaseResp(1,msg,data,total);
    }

    public BaseResp Fail(Integer code, String msg){
        return new BaseResp(code,msg,null,null);
    }
}
